package co.yixiang.modules.shop.rest;

import co.yixiang.aop.log.Log;
import co.yixiang.modules.shop.domain.YxInvestPackage;
import co.yixiang.modules.shop.service.YxInvestPackageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/api/yxInvestPackage")
@Api(value = "投资管理",description = "投资管理")
public class YxInvestPackageController {
    @Autowired
    private YxInvestPackageService investPackageService;
    @Log("查询所有套餐")
    @ApiOperation("查询所有套餐")
    @GetMapping("/findListAll")
    public ResponseEntity findListAll(){
        List<Map<String,Object>> list=investPackageService.findListAll();
        return new ResponseEntity(list, HttpStatus.OK);
    }

}
